<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
     <form action="${pageContext.request.contextPath}/user?method=insert " method="post">
                 用户名 <input type="text" name="name"/></br>
                 密码 <input type="password" name="password"/></br>
                邮箱 <input type="text" name="email"/></br>
                年龄 <input type="text" name="age"/></br>
                部门   <select name="departmentId">
                   <c:forEach items="${list}" var="department">
                        <option value="${department.id}">${department.name}</option>
                   </c:forEach>
                
                
              </select>
               <br/>
               <input type="submit" value="添加"/><br/>
     </form>
</body>
</html>